package com.xuecheng.system.init;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * <p>
 *     应用启动时将系统常量信息(枚举)初始化到数据库的数据字典表中--启动类
 * </p>
 *
 * @Description: 应用启动时将系统常量信息(枚举)初始化到数据库的数据字典表中,本类主要是程序启动时加载执行
 * @Author: Flippy
 */
@Component
public class StatusContentRunner implements ApplicationRunner {

    @Autowired
    private StatusContentTaskService contentTaskService;

    @Override
    public void run(ApplicationArguments args) throws Exception {

        contentTaskService.loadContent2DataSource();
    }
}